<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">

			function person(name,age){
				this.name=name;
				this.age=age;
				this.address="上海";
			}
//通过函数创建对象
		var p1=new person("张三",20);
		p1.address="杭州";
		alert(p1.address);
	
		</script>
	</body>
</html>
